<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>17-利用new Object创建对象</title>
    <script>
        //注意用这种方式的话要用等号
        var obj = new Object();
        obj.uname='张三';
        obg.age = 18;
        obg.sayHi = function(){
            console.log('hi~');
        }
        //调用方法与前面的方法一致
    </script>
</head>
<body>
    
</body>
</html>